//获取页面的URL
var url = window.location.href;
//split分割
var parameter = url.split("?")[1];
var array = url.split("=")[1];
var aarAy = array.split("&")[0];
var agent = new Number;
user(aarAy);
function user(aarAy) {
    $.post("http://www.brandt-beer.com/app/appuser/getAppUser",
        {SESSION_ID:aarAy},
        function (data) {
        console.log(data);
        var userName= data.data;
        agent = userName.IS_AGENT;
        document.getElementById("name").innerText=userName.NICKNAME;
        document.getElementById("img").src=userName.LOGO_IMG;
        switch (agent) {
            case 0:
                document.getElementById("state").innerText="代申请";
                break;
            case 1:
                document.getElementById("state").innerText="审核通过";
                break;
            case 2:
                document.getElementById("state").innerText="审核不通过";
                break;
            case 3:
                 document.getElementById("state").innerText="审核中";
                 break;
        }
    }
)}
//点击跳转我的页面
function meAccount() {
    window.location.href="./account/account-me.html?"+parameter;
}
function audit(){
        if (agent=0){
            window.location.href="audit/reviewComplete.html?"+parameter;
        }else {
            window.location.href="./audit/state/reviewComplete.html?"+parameter;
        }
}
//点击申请成为代理商，跳转